package com.ss.android.article.share.d;

import android.content.Context;
import com.bytedance.common.utility.Logger;
import com.bytedance.common.utility.UIUtils;
import com.ss.android.account.c.QZone;
import com.ss.android.article.browser.R;
import com.ss.android.article.share.entity.BaseShareContent;
import com.ss.android.article.share.entity.b;

public class c extends com.ss.android.article.share.e.c {
    protected boolean a;
    private static String b = "QQShareHelper";
    private Context c;

    public c(Context arg2) {
        this.a = false;
        this.c = arg2;
    }

    public final boolean a() {
        return QZone.a(this.c);
    }

    public final boolean a(BaseShareContent arg9) {
        boolean v0 = false;
        if(this.c == null || arg9 == null) {
            Logger.w(b, "parameters is null for shareQQ");
        }
        else if(!QZone.a(this.c)) {
            UIUtils.showImageToast(this.c, R.drawable.close_popup_textpage, R.string.toast_qq_not_install);
        }
        else {
            b v5 = new b(arg9);
            String v6 = this.c.getString(com.ss.android.article.browser.R.string.app_name);
            new StringBuilder().append(v6).append(QZone.a());
            if(this.a) {
                QZone.b(this.c, v5.a.getTargetUrl(), v5.a.getTitle(), v5.a.getText(), v5.a(), v5.b(), v6);
                v0 = true;
            }
            else {
                QZone.a(this.c, v5.a.getTargetUrl(), v5.a.getTitle(), v5.a.getText(), v5.a(), v5.b(), v6);
                v0 = true;
            }
        }

        return v0;
    }
}

